DROP TABLE IF EXISTS jms_dwd.dwd_project_customer_waybill_detail_dt;

CREATE EXTERNAL TABLE IF NOT EXISTS jms_dwd.dwd_project_customer_waybill_detail_dt(
waybill_no                      String             COMMENT '运单号',
pick_network_code               String             COMMENT '寄件网点编码',
pick_network_name               String             COMMENT '寄件网点名称',
franchisee_code                 String             COMMENT '加盟商编码',
franchisee_name                 String             COMMENT '加盟商名称',
subordinate_agent_code          String             COMMENT '代理区编码',
subordinate_agent_name          String             COMMENT '代理区名称',
customer_code                   String             COMMENT '客户编码',
customer_name                   String             COMMENT '客户名称',
project_customer_id             String             COMMENT '项目客户ID',
project_customer_name           String             COMMENT '项目客户名称',
input_time                      timestamp          COMMENT '运单录入时间',
collect_time                    timestamp          COMMENT '运单揽收时间',
delivery_time                   timestamp          COMMENT '运单寄件时间'
)
COMMENT '客户异常监控运单信息明细表'
PARTITIONED BY (dt string COMMENT '日期(yyyy-MM-dd)')
STORED AS PARQUET
LOCATION '/dw/hive/jms_dwd.db/external/dwd_project_customer_waybill_detail_dt'
TBLPROPERTIES (
'discover.partitions'='false',
'parquet.column.index.access'='true'
);

REPAIR MSCK TABLE jms_dwd.dwd_project_customer_waybill_detail_dt;